import Cookies from 'js-cookie';

const TokenKey = 'Mine-Token';
const UserKey = 'Mine-User';

export function getToken() {
  return Cookies.get(TokenKey);
}

export function setToken(token) {
  return Cookies.set(TokenKey, token);
}

export function removeToken() {
  return Cookies.remove(TokenKey);
}

export function getUserJson() {
  return Cookies.getJSON(UserKey);
}

export function setUser(user) {
  return Cookies.set(UserKey, user);
}

export function removeUser() {
  return Cookies.remove(UserKey);
}
